import { RequestType } from '~/config/enum/request-type.enum'
const CONTROLLER = 'role'
const SERVICE = 'service-manage'

export default {
  /**
   * 新增角色
   */
  createRole: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'createRole',
    type: RequestType.Post
  },
  /**
   * 修改角色
   */
  updateRole: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'updateRole',
    type: RequestType.Post
  },
  /**
   * 删除角色
   */
  deleteRole: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'deleteRole',
    type: RequestType.Delete
  },
  /**
   * 分页查询角色
   */
  findRoleListByPage: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'findRoleListByPage',
    type: RequestType.Get
  },
  /**
   * 根据角色ID分页查询用户列表
   */
  queryUserListByRoleId: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'queryUserListByRoleId',
    type: RequestType.Get
  },
  /**
   * 查询角色可选资源，标识出已选中的
   */
  findRoleResourceList: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'findRoleResourceList',
    type: RequestType.Get
  },
  /**
   * 角色分配资源
   */
  assignResourceToRole: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'assignResourceToRole',
    type: RequestType.Post
  },
}